package com.qf.smsplatform.gateway.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

/**
 *  缓存模块的Client接口
 * @author zjw
 */
@FeignClient(value = "sms-platform-cache")
public interface CacheClient {

    /**
     * 根据key和field查询hash结构中的value
     * @param key    redis的key
     * @param field  redis的hashKey
     * @return
     */
    @GetMapping("/cache/hget/{key}")
    String hget(@PathVariable String key, @RequestParam String field);

}
